package com.test.platform.module.perf.controller;

import com.test.common.entity.perf.PerfAgentEntity;
import com.test.common.response.ResponseResult;
import com.test.platform.module.perf.service.PerfAgentService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Slf4j
@Api(value = "value", tags = "性能平台执行机管理")
@RestController
@RequestMapping("/perf/agent")
@ResponseResult
public class PerfAgentController {

    @Resource
    private PerfAgentService perfAgentService;

    @GetMapping("searchAll")
    public Object searchAll(int pageNo, int pageSize) {
        return perfAgentService.searchAll(pageNo, pageSize);
    }

    @PostMapping("reflush")
    public Object reflush(@RequestBody PerfAgentEntity perfAgentInfo) {
        return perfAgentService.reflush(perfAgentInfo);
    }
}
